<template>
    <view class="department-tree" v-if="data">
        <!-- <select-department-tree-item v-if="data.children" v-for="(item,index) in data.children" :key="index" :data="item" @selectFn="selectFn"></select-department-tree-item> -->
        <select-department-tree-item :data="data" @selectFn="selectFn"></select-department-tree-item>
    </view>
</template>

<script>
import selectDepartmentTreeItem from "./select-department-tree-item.vue"
export default {
    name: "selectDepartmentTree",
    components: {
        selectDepartmentTreeItem,
    },
    props: {
        data: {
            type: Object,
            default: () => {},
        },
    },
    data() {
        return {}
    },
    mounted() {
        console.log(111)
        console.log(this.data)
    },
    onShow() {},
    methods: {
        selectFn(data) {
            this.$emit("selectFn", data)
        },
    },
}
</script>

<style lang="scss"></style>
